import mysql.connector


def grade_sim_search(province_name, school_name):
    con = mysql.connector.connect(
        host="192.168.80.190",
        port=3306,
        user="hive",
        password="12345678",
        database="gaokao"
    )
    cursor = con.cursor()
    where = "province_name = '{}' and school_name = '{}'".format(province_name, school_name)
    q = "select * from grade_sim where " + where
    cursor.execute(q)
    results = cursor.fetchall()
    print(results)
    cursor.close()
    con.close()
